﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AnQinFrameWorkAPI.Entity.SystemCore.Entity;

/// <summary>
///     编码规则模型
/// </summary>
[Table("CodeRule")]
public class CodeRuleModel
{
    #region 关联

    /// <summary>
    ///     编码规则
    /// </summary>
    public virtual ICollection<CodeRuleItemModel> CodeRuleItemList { get; set; } = new List<CodeRuleItemModel>();

    #endregion

    #region 字段

    /// <summary>
    ///     编码规则id
    /// </summary>
    [Key]
    [MaxLength(36)]
    public Guid Id { get; set; }

    /// <summary>
    ///     编码规则名称
    /// </summary>
    [MaxLength(50)]
    public string Name { get; set; }

    /// <summary>
    ///     分隔符
    /// </summary>
    [MaxLength(10)]
    public string? Symbol { get; set; }

    /// <summary>
    ///     当前编码
    /// </summary>
    [MaxLength(100)]
    public string? CurrentValue { get; set; }

    /// <summary>
    ///     序号
    /// </summary>
    public int Order { get; set; }

    /// <summary>
    ///     创建时间
    /// </summary>
    public DateTime CreateTime { get; set; }

    #endregion
}